package com.fangjinwang.zhushunqing.Ui.Product;

import com.fangjinwang.zhushunqing.R;
import com.jaydenxiao.common.PullRefresh.QQRefreshHeader;
import com.jaydenxiao.common.PullRefresh.RefreshLayout;
import com.jaydenxiao.common.base.BaseFragment;

import butterknife.Bind;

/**
 * Created by admin on 2016/11/3.
 */
public class ProductFragment extends BaseFragment {
    @Bind(R.id.rl_modulename_refresh)
    RefreshLayout mRefreshLayout;
    @Override
    protected int getLayoutResource() {
        return R.layout.fragment_product;
    }

    @Override
    public void initPresenter() {
//        mPresenter.setVM(this,mModel);
    }

    @Override
    protected void initView() {

        mRefreshLayout.setRefreshListener(new RefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                // 延迟3秒后刷新成功
                mRefreshLayout.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        mRefreshLayout.refreshComplete();
                    }
                }, 3000);
            }
        });

        QQRefreshHeader header  = new QQRefreshHeader(getActivity());
        mRefreshLayout.setRefreshHeader(header);
        mRefreshLayout.autoRefresh();
    }
}
